package com.hospital.register.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@ApiModel(description = "会员认证对象")
public class UserAuthDto implements Serializable {

    @ApiModelProperty(hidden = true, value = "id")
    private Long id;

    @ApiModelProperty(hidden = true, value = "认证状态（0：未认证 1：认证中 2：认证成功 -1：认证失败）")
    private Byte authStatus;

    @ApiModelProperty(value = "用户姓名")
    @NotBlank(message = "姓名不可为空")
    private String name;

    @ApiModelProperty(value = "证件类型")
    @NotBlank(message = "证件类型不可为空")
    @Pattern(message = "证件类型错误，10表示身份证，20表示户口本", regexp = "^[1-2]0$")
    private String certificatesType;

    @ApiModelProperty(value = "证件编号")
    @NotBlank(message = "证件编号不可为空")
    private String certificatesNo;

    @ApiModelProperty(value = "证件路径")
    // @NotBlank(message = "证件图片不可为空")
    // @Pattern(message = "请提供正确的证件图片地址", regexp = "^https?:\\/\\/(.+\\/)+.+(\\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$")
    private String certificatesUrl;

}
